import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p003 from './p003';
import p004 from './p004';
import p005 from './p005';


interface Iparam extends Event {
	page_no: number;
}

export default async function a008(fd: IFeidaoAiBrowserComponent, e: Iparam) {
	// todo

	const page_no = e.page_no;

	const res = await nodejs<{ res: Array<{}>; c: number; }>('risk_point/zj-000004/s001', { risk_po_name_no: '', page_no });

	if (res) {
		render(fd, res, p003, 'p003', 'inner');
		render(fd, { page_no: 1, total: res.c }, p004, 'p004', 'inner');
	} else {
		render(fd, '', p005, 'p005', 'inner');
	}

}
